package com.whq.thrift.api.gateway.job;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.whq.thrift.api.common.constants.CommonConfigConstants;
import com.whq.thrift.api.gateway.service.VerifyDbService;

/**
 * 从数据库中读取数据更新缓存
 * @author whq-mac
 *
 */
@Service
public class RefreshCacheDataFromDbJob {
	private static final Logger LOGGER_QUARTZ = LoggerFactory.getLogger(CommonConfigConstants.LOGGER_KEY_QUARTZ);
	
//	@Autowired
//	private ReloadableConfManager reloadableConfManager;
	
	@Autowired
	private VerifyDbService verifyDbService;
	
	public void refreshDataFromDbToCache() {
		LOGGER_QUARTZ.info("begin refresh cache data from db job");
		
		verifyDbService.getDataFromDbToCache();
		
		LOGGER_QUARTZ.info("end refresh cache data from db job");
	}
}
